xen/arm: Change the variable type of cpu_logical_map to register_t
authorWei Chen <wei.chen@linaro.org>
Tue, 31 May 2016 02:54:11 +0000 (10:54 +0800)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 1 Jun 2016 10:13:37 +0000 (11:13 +0100)
commitc1cab790d0599194b854f5f3ae0a89c6b0a69c1c
treeba537ef6d6802900b3e03ef309e6cae296fd428d
parent909bd140bfbfd3c762ae7ebf2bb41da00842c77d
xen/arm: Change the variable type of cpu_logical_map to register_t

The cpu_logical_map is used to store CPU hardware ID from MPIDR_EL1 or
from CPU node of DT. Currently, the cpu_logical_map is using the u32 as
its variable type. It can work properly while Xen is running on ARM32,
because the hardware ID is 32-bits. While Xen is running on ARM64, the
hardware ID expands to 64-bits and then the cpu_logical_map will overflow.

Change the variable type of cpu_logical_map to register_t will make
cpu_logical_map to store hardware IDs correctly on ARM32 and ARM64.

Signed-off-by: Wei Chen <Wei.Chen@linaro.org>
Acked-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/gic-v3.c
xen/arch/arm/smpboot.c
xen/include/asm-arm/processor.h